package cn.iocoder.yudao.module.dine.category.service.app;

import cn.iocoder.yudao.framework.business.basic.service.impl.AbstractService;
import cn.iocoder.yudao.module.dine.category.convert.DineCategoryConvert;
import cn.iocoder.yudao.module.dine.category.dao.DineCategoryMapper;
import cn.iocoder.yudao.module.dine.category.pojo.po.DineCategory;
import cn.iocoder.yudao.module.dine.category.pojo.vo.DineCategoryVO;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <pre>
 * OOoO0OOoO0OOOooo0oOOOO0OOOOO0oooOO0ooOOO0Ooooo0OOOOo0ooooO0OOooo0Ooooo0OOOOO
 * 服务
 * OOoO0OOoO0OOOooo0oOOOO0OOOOO0oooOO0ooOOO0Ooooo0OOOOo0ooooO0OOooo0Ooooo0OOOOO
 * </pre>
 *
 * @author 山野羡民（1032694760@qq.com）
 * @since 2025/07/18
 */
@Service
public class AppDineCategoryService extends AbstractService<DineCategory, DineCategoryVO> {
    @Resource
    private DineCategoryMapper dineCategoryMapper;

    @Override
    public DineCategoryMapper getInjectedMapper() {
        return dineCategoryMapper;
    }

    @Override
    public DineCategoryVO convertToViewObject(DineCategory entity) {
        return DineCategoryConvert.INSTANCE.toViewObject(entity);
    }

    public List<DineCategoryVO> getEnableCategoryList(Long shopId) {
        return dineCategoryMapper.selectEnableCategoryList(shopId);
    }

}
